package day33;

import java.util.Scanner;

/**
 * @author tongchen
 * @create 2023-04-11 19:29
 */
public class Main {
    public static void main(String[] args) {
        //定义输入
        Scanner scanner=new Scanner(System.in);
        while(scanner.hasNext()){
            String s=scanner.next();
            String t=scanner.next();
            int more = getMore(s, t);
            System.out.println(more);
        }
    }
    public static int getMore(String s,String t){
        if(s.length()<t.length()){
            return 0;
        }
        //正常情况下，如果相匹配每次走t的长度，如果不匹配每次走一个
        int count=0;//设置计数器
        int index=0;
        while(index<=s.length()-t.length()){
            if(s.substring(index, index+s.length()).equals(t)){
                index+=t.length();
                count++;
            }else{
                index++;
            }
        }
        return count;
    }
}
